package com.sayice.design.Mediator;

import java.util.ArrayList;
import java.util.List;

public class All implements Mediator{
    private Colleague airports=new Airports();
    private Colleague companies=new Companies();
    private Colleague hotels=new Hotels();
    private Colleague restaurants=new Restaurants();
    private Colleague tourism=new Tourism();
    List list=new ArrayList();
    @Override
    public void createColleague() {
        airports.addConsumer("1");
        companies.addConsumer("2");
        hotels.addConsumer("3");
        restaurants.addConsumer("4");
        tourism.addConsumer("5");
    }

    @Override
    public void transmitConsumer() {
         list.addAll(airports.getList());
         list.addAll(companies.getList());
         list.addAll(hotels.getList());
         list.addAll(restaurants.getList());
         list.addAll(tourism.getList());
    }
}
